﻿@model qltscd.Models.ThayThe
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/Modules/_LayoutTacVuNhapLieu.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm("Create", "ThayThe", FormMethod.Post)) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Thay thế</legend>
        <table border="0" width="100%" cellpadding="10px" cellspacing="10px">
            <tr>
                <td style="margin-left: 10px;" class="label_col">
                    Mã thay thế
                </td>
                <td>
                    @Html.TextBoxFor(model => model.MaThayThe, new { @style = "width:97%;" })
                </td>
                <td style="margin-left: 10px;" class="label_col">
                    Người ký
                </td>
                <td>
                    @Html.TextBoxFor(model => model.NguoiKy, new { @style = "width:97%;" })
                </td>
            </tr>
            <tr>
                <td style="margin-left: 10px;" class="label_col">
                    Thiết bị cũ
                </td>
                <td>
                    @(Html.Telerik().ComboBox()
                    .Name("ThietBiCu")
                    .HtmlAttributes(new { @style = "width:97%;" })
                    .BindTo((SelectList)ViewBag.ThietBiCu)
                )
                </td>
                <td style="margin-left: 10px;" class="label_col">
                    Tình trạng
                </td>
                <td>
                    @Html.TextBoxFor(model => model.TinhTrang, new { @style = "width:97%;" })
                </td>
            </tr>
            <tr>
                <td style="margin-left: 10px;" class="label_col">
                    Thiết bị mới
                </td>
                <td>
                    @(Html.Telerik().ComboBox()
                    .Name("ThietBiMoi")
                    .HtmlAttributes(new { @style = "width:97%;" })
                    .BindTo((SelectList)ViewBag.ThietBiMoi)
                )
                </td>
                <td style="margin-left: 10px;" class="label_col">
                    Ngày ký
                </td>
                <td>
                    @(Html.Telerik().DatePicker()
                    .Name("NgayKy")
                    .HtmlAttributes(new { @style = "width:97%;" })
                )
                </td>
            </tr>
            <tr>
                <td style="margin-left: 10px;" class="label_col">
                    Đề xuất
                </td>
                <td colspan="3">
                    @Html.TextAreaFor(model => model.DeXuat, new { @style = "width: 95%; height: 30px; " })
                </td>
            </tr>
        </table>
    </fieldset>
    <div class="divButton">
        <input type="submit" value="Lưu" class="button" />&nbsp;
        <input type="reset" value="Nhập lại" class="button" />&nbsp;
        @Html.ActionLink("Thoát", "Index", "TacVu", null, new { @class = "button" })
    </div>
}
<div class="errBlock">
    @Html.ValidationMessageFor(model => model.IdentityThayThe, "", new { @style = "display:block" })
    @ViewData[qltscd.Contansts.SessionConstants.ERROR_MESSAGE]
    <br />
    @Html.ValidationMessageFor(model => model.MaThayThe, "", new { @style = "display:block" })
    @Html.ValidationMessageFor(model => model.NgayKy, "", new { @style = "display:block" })
    @Html.ValidationMessageFor(model => model.NguoiKy, "", new { @style = "display:block" })
    @Html.ValidationMessageFor(model => model.ThietBiCu, "", new { @style = "display:block" })
    @Html.ValidationMessageFor(model => model.ThietBiMoi, "", new { @style = "display:block" })
    @Html.ValidationMessageFor(model => model.TinhTrang, "", new { @style = "display:block" })
</div>
